import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:hook_rent/pages/home/info/index.dart';
import 'package:hook_rent/pages/home/tab_index/index_navigator.dart';
import 'package:hook_rent/pages/home/tab_index/index_recommend.dart';
import 'package:hook_rent/widgets/search_bar/index.dart';
import 'package:hook_rent/widgets/swiper_widget.dart';

class TabIndex extends StatelessWidget {
  final String title;
  const TabIndex({super.key, required this.title});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(
        title: SearchBarWidget(
          showLocation: true,
          defaultInputValue: '请输入搜索内容',
          goBackCallback: () {},
          onCancel: () {},
          showMap: true,
        ),
        backgroundColor: Colors.white,
      ),
      body: ListView(children: [
        SwiperWidget(),
        10.verticalSpace,
        const IndexNavigator(),
        15.verticalSpace,
        const IndexRecommend(),
        10.verticalSpace,
        const Info(
          showTitle: true,
        ),
      ]),
    );
  }
}
